package com.twu.biblioteca;

public class MembershipDetailsMenuItem extends MenuItem{

    public MembershipDetailsMenuItem(BibliotecaApp bibliotecaAppObject)
    {
        super("Check membership details",bibliotecaAppObject);
    }

    @Override
    public void takeAction() {
        //takes Action for menu item to Check membership details
        if(!bibliotecaAppObject.libraryObject.checkLoggedInCurrentUser())
            bibliotecaAppObject.libraryObject.userLogIn();
        if(bibliotecaAppObject.libraryObject.checkLoggedInCurrentUser())
            System.out.println(bibliotecaAppObject.libraryObject.currentUser.displayUserAccountDetails());
        else
            System.out.println("\tPlease talk to a Librarian. Thank you.");
    }
}
